import { Module } from "vuex";
import { GlobalDataProps } from "../index";
export interface userProps {
    token: string;
    userInfo: {
        avatar: string;
        name: string;
    };
}

const user: Module<userProps, GlobalDataProps> = {
    namespaced: true,
    state: {
        token: "",
        userInfo: {
            avatar: "",
            name: "黄石管理员",
        },
    },
    getters: {
        userInfo: (state) => {
            return state.userInfo;
        },
    },
};

export default user;
